import 'package:base/base/theme.dart';
import 'package:base/base_lib.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

extension StringExt on String {
  get menuIcon => assetRealImage(
      width: 26.w,
      height: 26.h,
      dartColor: KColors.c_FFFFFF,
      color: KColors.c_333333);

  Text get menuText => Text(
        this,
        style: KTheme.moreMenuTextStyle,
        textAlign: TextAlign.center,
      );

  Text get titleText => Text(this, style: KTheme.normalTextStyle14);

  Text get text12sp =>
      Text(this, style: 12.sp.toTextStyle(color: KColors.c_FFFFFF));
}

extension WidgetExt on Widget {
  /// 统一设置tabBox
  TabBox setMenuItem({int height: 50, final Function()? onTap}) => TabBox(
      height: height.h,
      child: Padding(padding: EdgeInsets.only(left: 12.w), child: this),
      onTap: onTap);
}
